const express = require('express');
const bodyParser = require('body-parser');

const app = express();

app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());

app.post('/login', (req, res) => {
    const {username, password} = req.body;
    if (username === 'admin' && password === '123456') {
        res.send('Login successful');
    } else {
        res.send('Login failed');
    }
});

app.listen(3000, () => {
    console.log('Server is running at http://127.0.0.1:3000');
});

